Skip to main content

Dev Tips & Tricks


Reset the MongoDB database

Useful for dropping development data

  1. Check that the stencil database is visible

    mongo
    show dbs
    • Expect an output similar to this:
    db namedb size
    admin0.000GB
    config0.000GB
    local0.000GB
    stencilDB0.000GB
  1. Make the stencilDB the active database

    use stencilDB

    switched to db stencilDB

  2. Drop all data from the database

    db.dropDatabase()

    { "ok" : 1 }

  3. Quit the mongo interface

    exit